import api.HttpList;
import banner.BannerHelper;
import bean.Docs;
import service.DownloadService;
import util.ThreadUtils;

import java.util.ArrayList;
import java.util.concurrent.ExecutorService;

public class Main {
    public static void main(String[] args) {
        // 启动banner
        BannerHelper.banner("banner.txt", 2);
        // 获取下载文件基础信息
        System.out.println("需要导出的专栏id为：" + args[1] + " 导出目录为：" + args[3]);
        System.out.println("--------------------------------");
        ArrayList<Docs> downLoadUrl = new HttpList().getFileInfoList(args[1]);
        // 下载文件，多线程
        ExecutorService executorService = new ThreadUtils().creatThreadPool();
        new DownloadService().downloadWord(downLoadUrl, executorService, args[3]);
    }
}
